package util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class StringUtil {

    public static String matcheOne(String text,String regx){
        Pattern regex = Pattern.compile(regx, Pattern.CASE_INSENSITIVE);
        Matcher matcher = regex.matcher(text);
        String str = null;
        if (matcher.find()) {
            str = matcher.group();
        }
        return str != null ? str : "匹配找不到";
    }
}
